from manimlib import *

class ZWExample(Scene):
    def construct(self):
        # 两种方式创建文本
        # title = Text("吴忠威", font = "Consolas", font_size = 90)
        title = Text("""
            hello world
          """, font = "Consolas", font_size = 90
        )
        
        discription = Text("""
          "吴忠威" 是一个高尚的人一个纯粹的人一个有道德的人一个脱离了低级趣味的人一个有益于人民的人
        """, font="宋体", font_size = 24,
          t2c = {"高尚": BLUE, "纯粹": GREEN, "有道德": YELLOW, "脱离": BLUE, "有益": BLUE, "人民": ORANGE}
        )
        VGroup(title, discription).arrange(DOWN, buff = 1)
        self.play(Write(title))
        self.play(FadeIn(discription, UP))
        self.wait()
        self.play(FadeOut(title), FadeOut(discription, shift = DOWN))
        